const materialColumns = [
  {
    title: '序号',
    dataIndex: 'index',
    width: 70,
    // fixed: 'left',
    scopedSlots: { customRender: 'index' }
  },
  {
    title: '二级物资目录',
    dataIndex: 'secondaryMaterialList',
    width: 120,
    // fixed: 'left',
    scopedSlots: { customRender: 'secondaryMaterialList' }
  },
  {
    width: 100,
    title: '目录编码',
    dataIndex: 'materialCode',
    scopedSlots: { customRender: 'materialCode' }
  },
  {
    width: 150,
    title: '采购方式',
    dataIndex: 'purchaseTypeStr',
    scopedSlots: { customRender: 'purchaseTypeStr' },
    excelConfig: {
      dataValidation: {
        type: 'list'
      },
    }
  },
  {
    width: 150,
    title: '总责任人',
    dataIndex: 'chargePerson',
    scopedSlots: { customRender: 'chargePerson' }
  },
  {
    width: 150,
    title: '总责任人电话',
    dataIndex: 'chargePersonPhone',
    // isHidden: true,
    excelConfig: {
      fill: {
        type: 'gradient',
        gradient: 'path',
        center: { left: 0.5, top: 0.5 },
        stops: [
          { position: 0, color: { argb: 'FFFFFF00' } },
          { position: 1, color: { argb: 'FFFFFF00' } }
        ]
      },
      note: '电话为此责任人账号'
    }
  },
  {
    width: 150,
    title: '计划时间',
    dataIndex: 'planTime',
    scopedSlots: { customRender: 'planTime' },
    excelConfig: {
      note: '时间格式为：YYYY/MM/DD 如2020/2/2',
    }
  },
  {
    width: 140,
    title: '产运周期（天）',
    dataIndex: 'productionCycle',
    scopedSlots: { customRender: 'productionCycle' },
  },
  {
    width: 150,
    title: '物资进场最迟时间',
    dataIndex: 'materailsApproachTime',
    scopedSlots: { customRender: 'materailsApproachTime' },
    excelConfig: {
      note: '时间格式为：YYYY/MM/DD 如2020/2/2',
    }
  },
  {
    width: 150,
    title: '物资进场责任人',
    dataIndex: 'materailsApproachPerson',
    scopedSlots: { customRender: 'materailsApproachPerson' }
  },
  {
    width: 150,
    title: '物资进场责任人电话',
    dataIndex: 'materailsApproachPersonPhone',
    // isHidden: true,
    excelConfig: {
      fill: {
        type: 'gradient',
        gradient: 'path',
        center: { left: 0.5, top: 0.5 },
        stops: [
          { position: 0, color: { argb: 'FFFFFF00' } },
          { position: 1, color: { argb: 'FFFFFF00' } }
        ]
      },
      note: '电话为此责任人账号'
    }
  },
  {
    width: 150,
    title: '物资招标最迟时间',
    dataIndex: 'materailsBiddingTime',
    scopedSlots: { customRender: 'materailsBiddingTime' },
    excelConfig: {
      note: '时间格式为：YYYY/MM/DD 如2020/2/2',
    }
  },
  {
    width: 150,
    title: '物资招标责任人',
    dataIndex: 'materailsBiddingPerson',
    scopedSlots: { customRender: 'materailsBiddingPerson' }
  },
  {
    width: 150,
    title: '物资招标责任人电话',
    dataIndex: 'materailsBiddingPersonPhone',
    // isHidden: true,
    excelConfig: {
      fill: {
        type: 'gradient',
        gradient: 'path',
        center: { left: 0.5, top: 0.5 },
        stops: [
          { position: 0, color: { argb: 'FFFFFF00' } },
          { position: 1, color: { argb: 'FFFFFF00' } }
        ]
      },
      note: '电话为此责任人账号'
    }
  },
  {
    width: 150,
    title: '品牌业主确认最迟时间',
    dataIndex: 'brandOwnersConfirmTime',
    scopedSlots: { customRender: 'brandOwnersConfirmTime' },
    excelConfig: {
      note: '时间格式为：YYYY/MM/DD 如2020/2/2',
    }
  },
  {
    width: 130,
    title: '品牌业主确认责任人',
    dataIndex: 'brandOwnersConfirmPerson',
    scopedSlots: { customRender: 'brandOwnersConfirmPerson' }
  },
  {
    width: 150,
    title: '品牌业主确认责任人电话',
    dataIndex: 'brandOwnersConfirmPersonPhone',
    // isHidden: true,
    excelConfig: {
      fill: {
        type: 'gradient',
        gradient: 'path',
        center: { left: 0.5, top: 0.5 },
        stops: [
          { position: 0, color: { argb: 'FFFFFF00' } },
          { position: 1, color: { argb: 'FFFFFF00' } }
        ]
      },
      note: '电话为此责任人账号'
    }
  },
  {
    width: 150,
    title: '需求计划编制最迟时间',
    dataIndex: 'demandPlanTime',
    scopedSlots: { customRender: 'demandPlanTime' },
    excelConfig: {
      note: '时间格式为：YYYY/MM/DD 如2020/2/2',
    }
  },
  {
    width: 130,
    title: '需求计划编制责任人',
    dataIndex: 'demandPlanPerson',
    scopedSlots: { customRender: 'demandPlanPerson' }
  },
  {
    width: 150,
    title: '需求计划编制责任人电话',
    dataIndex: 'demandPlanPersonPhone',
    // isHidden: true,
    excelConfig: {
      fill: {
        type: 'gradient',
        gradient: 'path',
        center: { left: 0.5, top: 0.5 },
        stops: [
          { position: 0, color: { argb: 'FFFFFF00' } },
          { position: 1, color: { argb: 'FFFFFF00' } }
        ]
      },
      note: '电话为此责任人账号'
    }
  },
  {
    width: 110,
    title: '风险源分析',
    dataIndex: 'riskAnalysis',
    scopedSlots: { customRender: 'riskAnalysis' }
  },
  {
    width: 100,
    title: '风险辨识',
    dataIndex: 'riskIdentification',
    scopedSlots: { customRender: 'riskIdentification' }
  },
  {
    width: 100,
    title: '应对措施',
    dataIndex: 'countermeasures',
    scopedSlots: { customRender: 'countermeasures' }
  },
  {
    width: 140,
    title: '甲方认价（元）',
    dataIndex: 'apartyPrice',
    scopedSlots: { customRender: 'apartyPrice' },
    excelConfig: {
      dataValidation: {
        type: 'decimal',
        operator: 'lessThan',
        showErrorMessage: true,
        allowBlank: true,
        formulae: [1000000000000000000],
        errorStyle: 'error',
        errorTitle: '提示',
        error: '甲方认价（元）不能超过18位数'
      }
    }
  },
  {
    width: 130,
    title: '成本（元）',
    dataIndex: 'cost',
    scopedSlots: { customRender: 'cost' },
    excelConfig: {
      dataValidation: {
        type: 'decimal',
        operator: 'lessThanOrEqual',
        showErrorMessage: true,
        allowBlank: true,
        formulae: [1000000000000000000],
        errorStyle: 'error',
        errorTitle: '提示',
        error: '成本（元）不能超过18位数'
      }
    }
  },
  {
    width: 130,
    title: '价差效益（元）',
    dataIndex: 'priceDifference',
    scopedSlots: { customRender: 'priceDifference' },
    excelConfig: {
      dataValidation: {
        type: 'decimal',
        operator: 'lessThanOrEqual',
        showErrorMessage: true,
        allowBlank: true,
        formulae: [1000000000000000000],
        errorStyle: 'error',
        errorTitle: '提示',
        error: '价差效益（元）不能超过18位数'
      }
    }
  },
  {
    width: 130,
    title: '量差效益（元）',
    dataIndex: 'quantityDifference',
    scopedSlots: { customRender: 'quantityDifference' },
    excelConfig: {
      dataValidation: {
        type: 'decimal',
        operator: 'lessThanOrEqual',
        showErrorMessage: true,
        allowBlank: true,
        formulae: [1000000000000000000],
        errorStyle: 'error',
        errorTitle: '提示',
        error: '量差效益（元）不能超过18位数'
      }
    }
  },
  {
    width: 130,
    title: '效益总额（元）',
    dataIndex: 'totalBenefit',
    scopedSlots: { customRender: 'totalBenefit' },
    excelConfig: {
      dataValidation: {
        type: 'decimal',
        operator: 'lessThanOrEqual',
        showErrorMessage: true,
        allowBlank: true,
        formulae: [1000000000000000000],
        errorStyle: 'error',
        errorTitle: '提示',
        error: '甲方认价（元）不能超过18位数'
      }
    }
  },
  {
    width: 130,
    title: '效益率（%）',
    dataIndex: 'benefitRate',
    scopedSlots: { customRender: 'benefitRate' }
  },
  {
    width: 150,
    title: '备注',
    dataIndex: 'remark',
    scopedSlots: { customRender: 'remark' }
  },
]
const formData = {
  // 二级物资目录
  materialCode: '',// 目录编码
  purchaseType: '',// 采购方式
  chargePerson: '',// 总责任人
  planTime: '',// 计划时间
  productionCycle: '',// 产运周期（天）
  materailsBiddingTime: '',// 物资进场最迟时间
  materailsApproachPerson: '',// 物资进场责任人
  materailsBiddingPerson: '',// 物资招标责任人
  brandOwnersConfirmTime: '',// 品牌业主确认最迟时间
  brandOwnersConfirmPerson: '',// 品牌业主确认责任人
  demandPlanTime: '',// 需求计划编制最迟时间
  demandPlanPerson: '',// 需求计划编制责任人
  riskAnalysis: '',// 风险源分析
  riskIdentification: '',// 风险辨识
  countermeasures: '',// 应对措施
  apartyPrice: '',// 甲方认价（元）
  cost: '',// 成本（元）
  priceDifference: '',// 价差效益（元）
  quantityDifference: '',// 量差效益（元）
  totalBenefit: '',// 效益总额（元）
  benefitRate: '',// 效益率（%）
  remark: '',// 备注
  materialPurchaseId: null//主表行id
}
export { materialColumns, formData }
